package at.ac.tuwien.infosys.aic11.services;


import javax.faces.bean.ApplicationScoped;
import javax.inject.Named;

import at.ac.tuwien.infosys.aic11.dto.Address;
import at.ac.tuwien.infosys.aic11.dto.Customer;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: gh
 * Date: 08.11.11
 * Time: 12:43
 * To change this template use File | Settings | File Templates.
 */

@ApplicationScoped
@Named
public class CustomerService implements Serializable{

	private static final long serialVersionUID = 1L;

	public CustomerService(){

	}

	public List<Customer> getCustomers(){

		Address a = new Address("0001","street","vienna","22","2","1040");
		Address a1 = new Address("0002","street","vienna","22","7","1040");
		Address a2 = new Address("0003","street","vienna","22","6","1040");
		Address a3 = new Address("0004","street","vienna","22","5","1040");


		Customer customer = new Customer(0001,"sepp","sack","bauer",a);
		Customer customer1 = new Customer(0002,"sepp","sack","bauer",a1);
		Customer customer2 = new Customer(0003,"sepp","sack","bauer",a2);
		Customer customer3 = new Customer(0004,"sepp","sack","bauer",a3);

		ArrayList<Customer> customers = new ArrayList<Customer>();
		customers.add(customer);
		customers.add(customer1);
		customers.add(customer2);
		customers.add(customer3);

		return customers;
	}
}
